<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//这里写路由  访问地址前面加个api 先去kernel中注册


Route::get('tt',function(){
    echo 2;
})->middleware('access_token');


Route::get('get',function(){
    echo 1;
})->middleware('access_token');


//前缀为api/admin的路由
//site_url == env('APP_URL');
Route::group(['middleware' => ['api'],'prefix' => 'admin'], function () {
    Route::get('goods','admin\\goods\\GoodsController@index');
});

